Sources and Sinks - An Analysis of Bike Sharing in Montreal¶

by Elliott Kobelansky

Summary¶

This project analyzes trip-level data from Montreal’s Bixi bike-sharing system in 2024 (≈13 million rides). Using spatial and temporal analyses, I investigate how certain stations act as sources (net exporters of bikes) while others act as sinks (net importers). Results reveal a strong north–south divide across Sherbrooke Street, influenced by elevation, metro access, and land use. Time series and hourly analyses further highlight behavioral patterns like evening rush-hour dominance and weather sensitivity.

Background: What is Bixi?¶

Bixi is Montreal’s public bike-sharing system, launched in 2009. It allows residents and visitors to rent bicycles for short trips across the city through a network of docking stations. Users can pick up a bike at one station and return it to any other station, making it a flexible and eco-friendly option for commuting, running errands, or exploring the city. Bixi has become an integral part of Montreal’s urban mobility, especially in dense neighborhoods, along commuting corridors, and near tourist areas. Fun fact: TIME magazine named Bixi one of the top 25 inventions of the past 25 years, and has since inspired bike-sharing platforms in cities around the world.

Motivation: Why Study Bike Flow?¶

I live at the top of a fairly steep hill, and I often noticed that the nearby Bixi stations seemed to have more bikes leaving than returning. After all, who wants to bike uphill? Later, the idea came up again when a friend mentioned that the Bixi station near McGill University downtown was often empty, leaving them frustrated.

These experiences sparked my curiosity about the source–sink dynamics of Bixi stations: why and when do some consistently lose bikes while others accumulate them? This project explores that question, along with a few related ones about geography and temporal behavior. More broadly, it’s part of my interest in understanding transportation patterns in urban environments.

Data & Setup¶

Ride data for this analysis comes from Bixi's Open Data Portal, specifically trip-level data for 2024. Each record contains information about individual rides:

  • Start Station, borough, and coordinates
  • End station, borough, and coordinates
  • Start time and end time

In total, this dataset includes more than 13 million trips!

Other sources include:

  • Climate Data: Environment Canada's historical weather data, specifically the data collected at Montreal-Trudeau Airport in 2024 (Daily).
  • Metro locations: The City of Montreal's public transit dataset.
  • Elevation data: Queried using the Open-Elevation API.

A quick look at the trip dataset:

STARTSTATIONNAME STARTSTATIONARRONDISSEMENT STARTSTATIONLATITUDE STARTSTATIONLONGITUDE ENDSTATIONNAME ENDSTATIONARRONDISSEMENT ENDSTATIONLATITUDE ENDSTATIONLONGITUDE STARTTIMEMS ENDTIMEMS
0 Métro Champ-de-Mars (Viger / Sanguinet) Ville-Marie 45.510253 -73.556777 St-Antoine / Jean-Paul Riopelle Ville-Marie 45.502940 -73.560640 1704230756167 1.704231e+12
1 Métro Place-d'Armes (Viger / St-Urbain) Ville-Marie 45.506314 -73.559671 de Maisonneuve / Aylmer (est) Ville-Marie 45.505386 -73.570432 1704232888826 1.704233e+12
2 Émile-Duployé / Sherbrooke Le Plateau-Mont-Royal 45.527195 -73.564526 Parc Molson (d'Iberville / Beaubien) Rosemont - La Petite-Patrie 45.549022 -73.591982 1704238154678 1.704239e+12
3 Marmier / St-Denis Rosemont - La Petite-Patrie 45.531027 -73.598623 Roy / St-André Le Plateau-Mont-Royal 45.521564 -73.570367 1704232695740 1.704233e+12
4 Marmier / St-Denis Rosemont - La Petite-Patrie 45.531027 -73.598623 Parc Molson (d'Iberville / Beaubien) Rosemont - La Petite-Patrie 45.549022 -73.591982 1704243796167 1.704244e+12

Citywide Net Flow¶

To understand long-term spatial trends, I aggregated all 2024 Bixi trips by station and computed two key metrics for each station: normalized net flow ($\delta$) and total activity ($a$). The resulting map below highlights source–sink behavior across Montreal.

For a given station, let $$x = (x_{\text{in}}, x_{\text{out}}),$$ where:

  • $x_{\text{in}} = $ total number of trips ending at the station over the year
  • $x_{\text{out}} = $ total number of trips starting at the station over the year.

Then,

  • Circle color represents the normalized net flow: $$\delta = \frac{x_{\text{in}} - x_{\text{out}}}{x_{\text{in}} + x_{\text{out}}}$$

    Red stations are sources (more bikes leaving than arriving) and green stations are net sinks (more bikes arriving than leaving).

  • Circle size represents total activity

    $$a = x_{\text{in}} + x_{\text{out}}$$

The map is interactive! Try moving around, zooming in, and clicking on stations.

Make this Notebook Trusted to load map: File -> Trust Notebook

Interpreting Spatial Patterns¶

Beyond the expected concentration of activity downtown, one striking feature emerges: a sharp north-eastward dividing line between “green” stations (sinks) and “red” stations (sources). This line aligns almost perfectly with Sherbrooke Street, which acts as a natural boundary in Montreal’s urban layout. North of Sherbrooke is predominantly residential, where bikes tend to leave stations in the morning (sources). South of Sherbrooke is predominantly commercial, where bikes arrive more often (sinks).

Key Neighborhoods¶

The Plateau Mont-Royal neighborhood is an area with high activity. Many bikes are leaving stations here, likely because this is a residential neighborhood. The general community is on the younger side. Combined with limited parking in the neighborhood, cycling naturally emerges as a convenient alternative.

The Downtown area is almost uniformly filled with sink-type stations. Not only is it slightly downhill from neighborhoods above Sherbrooke, but it’s also a major work and entertainment hub. People likely commute here in the morning and return home by other means later in the day.

Around the Old Port, tourism likely amplifies sink behaviour, as visitors likely commute to these popular locations.

Likely Factors¶

Here are some proposed factors that are likely to affect sink/source behaviour:

  • Elevation: Stations at higher altitudes tend to be sources.
  • Proximity to a metro station: Metro-adjacent stations show higher polarity and activity
  • Land use: Residential vs commercial areas influence flow direction.
  • Tourist hotspots: Increase inbound trips at popular destinations.
  • Population density: Denser areas tend to generate more activity.

Top 5: Normalized Net Flow and Activity¶

For context (and out of curiosity), below are the top 5 stations ranked by the absolute value of normalized net flow and total activity.

A Special Case: Métro Villa-Maria¶

Funnily enough, this is one of the stations that initally had me wondering about these Bixi stations. Among all 1062 stations, it has the strongest normalized net flow, acting as a clear source. Here are some characteristics of this station

  • Positioned on a steep slope, discouraging biking uphill.
  • Located next to a metro station, a school, and a cégep (college)
  • Situated east of Monkland Village, a predominantly residential area.
  • Commuters likely walk uphill in the morning and cycle downhill in the evening.

On a personal note, I experience a similar pattern in this area, though using the metro rather than Bixi: when heading downtown, I typically walk downhill to Sherbrooke street and take the transit there, while on the return trip I get off at Villa-Maria to avoid the strenuous uphill walk (I will be able to tell my future grandkids I had the luxury of walking downhill both ways to school). This behavior aligns closely with the Bixi station’s role as a net source.

name lat lon start_count end_count net_flow activity normed_net_flow
574 Métro Villa-Maria (de Monkland / Décarie) 45.478968 -73.619599 14717.0 6990.0 -7727.0 21707.0 -0.355968
793 Square-Victoria (Viger / du Square-Victoria) 45.502085 -73.562941 15685.0 31086.0 15401.0 46771.0 0.329285
791 Square Victoria (Viger / du Square-Victoria) 45.502060 -73.562950 11195.0 22074.0 10879.0 33269.0 0.327001
554 Métro Place-d'Armes (Viger / St-Urbain) 45.506314 -73.559671 16325.0 30485.0 14160.0 46810.0 0.302499
923 Viger / Chenneville 45.505312 -73.560891 10136.0 18594.0 8458.0 28730.0 0.294396
name lat lon start_count end_count net_flow activity normed_net_flow
543 Métro Mont-Royal (Utilités publiques / Rivard) 45.524236 -73.581552 117746.0 110896.0 -6850.0 228642.0 -0.029960
1114 du Mont-Royal / Clark 45.519410 -73.586850 107638.0 94981.0 -12657.0 202619.0 -0.062467
465 Marquette / du Mont-Royal 45.532218 -73.575431 78799.0 76797.0 -2002.0 155596.0 -0.012867
394 Laurier / St-Denis 45.527148 -73.589479 84152.0 71121.0 -13031.0 155273.0 -0.083923
1089 des Pins / St-Laurent 45.515228 -73.575096 79154.0 72992.0 -6162.0 152146.0 -0.040501

Simple Quantitative Relationships¶

Two key factors appear to influence a station's behaviour: elevation and proximity to metro stations. The scatter plots below illustrate how these factors relate to normalized net flow ($\delta$) and total activity ($a$).

Elevation vs NNF¶

As expected, stations at higher elevations tend to act as sources, while those at lower elevations tend to be sinks. A simple least-squares regression gives

$$R^2 = 0.38 \quad (n = 1062)$$

indicating a moderate correlation between elevation and normalized net flow.

Elevation vs Activity¶

There is no significant correlation between elevation and total activity; high or low stations can be either busy or quiet depending on other factors.

Metro Proximity vs NNF¶

Busier parts of the city are naturally more likely to have nearby metro stations. Metro proximity appears to be a “necessary but not sufficient” condition for a station to exhibit strong source or sink behavior.

Through "very rigorous" eyeballing, an approximate upper bound for the absolute value of normalized net flow can be described by:

$$|\delta| \leq 0.3 e^{- \sqrt{x} / 30},$$

where $x$ is the distance to the nearest metro station, in metres.

Metro Proximity vs Activity¶

Similarly, station activity appears bounded by metro proximity. A rough upper bound for total activity is given by:

$$ a \leq 200000 e^{-x/1250}.$$

These relationships suggest that proximity to transit and elevation do influence flow and activity, but there are definitely other factors in play.

No description has been provided for this image

Temporal Dynamics¶

With the spatial source–sink patterns established, we can now examine how Bixi usage evolves over time.

Trips Per Day¶

A natural first question is: how does daily Bixi usage evolve over the year? A simple first observation is that, as expected, trips are heavily concentrated during the warmer months.

The data is surprisingly noisy: while there seems to be a weekly cyclic pattern reflecting weekday commuting (vs weekend commuting), day-to-day variations can reach up to 20,000 trips.

Most downward spikes can be attributed to two main causes:

  • Rainfall: Days with 10 mm or more of precipitation are marked on the graph. One extreme case (pink dot) was a day with 14 cm of rain, which led to a drop of around 60000 trips.

  • Holidays and holiday-adjacent weekends: National holidays reduce weekday commuting. For example:

    • June 24 (St-Jean-Baptiste Day), July 1 (Canada Day), and September 2 (Labour Day) coincide with long weekends during which residents might travel elsewhere.

    • October 14 (Thanksgiving) also explains a notable decrease in trips, i.e. the major downwards spike in October.

No description has been provided for this image

Hourly Flow¶

Beyond daily patterns, we can examine how Bixi usage varies by hour. The graph below shows total trip counts for 2024, grouped by hour. As expected, there are two prominent rush-hour peaks, but interestingly, the evening peak is consistently higher than the morning.

The inflow and outflow curves closely mirror each other, due to the fact that most trips are short and typically under one hour (so, on average, most trips start and end in the same hour).

Evening (5pm) Dominance¶

Several factors likely contribute to the evening rush hour being more active:

  • Montreal's hilly terrain may lead commuters to take transit uphill in the morning and cycle downhill in the evening.
  • Evening rides may often include recreational trips, which are less common in the morning.
  • Morning start times tend to be more staggered, while end times are more concentrated (in terms of work hours).

My theory is that factors like these accumulate and explain this pronounced 5pm spike.

Weekday vs. Weekend Patterns¶

Human behaviour is obviously significantly different between weekday and weekends. Separating the data reveals:

  • Weekdays: The curve is very close to the overall daily pattern, dominated by rush hours.
  • Weekends: Trip patterns form a more sinusoidal (leisure-oriented) curve, mostly independent of the typical commuting times.
No description has been provided for this image

Combining Everything: NNF per Hour¶

To capture the dynamic behavior of Bixi stations throughout the day, here is an animated map showing the hourly evolution of normalized net flow (NNF) at each station. (Note: make sure to press the "play" button on the toolbar below).

Again, the color represents the station’s NNF, with red indicating sources (more bikes leaving than arriving) and green indicating sinks (more bikes arriving than leaving), and size represents total station activity.

Key Observations

  • Morning rush hour: The residential/commercial divide is striking. Stations north of Sherbrooke Street are mostly red (sources), while downtown stations are green (sinks). This clearly reflects commuter flow.
  • Evening rush hour: Activity is higher overall (as seen in the graph above), but the polarization between sources and sinks is less extreme. Bikes are moving across more of the city, likely reflecting a mix of leisure trips, errands, and people returning home from various neighborhoods rather than a strict commute. Certain areas have more notable polarization, such as the McGill area which clearly becomes a net source around 5pm.
  • Late-night behavior (12 AM – 4 AM): Surprisingly, there is quite the late-night activity in the Plateau. With metros closed, biking seems to serve as a convenient late-night transport option, likely for nightlife-related trips. Meanwhile, downtown stations see almost no activity during these hours, which is quite the contrast to the busy daytime patterns.

The Dynamic Nature of Net Flow¶

Net flow clearly fluctuates throughout the day rather than remaining stable. Even stations that ranked highly in the “top net flow” lists do not maintain a consistent source or sink status at all hours. For example, a station may act as a strong source during the morning commute, sending many bikes downhill toward downtown, but by mid-afternoon it may see little net movement, or even reverse to a slight sink as people take bikes back home. This shows that net flow is inherently dynamic. A high net-flow station in the yearly aggregate may only achieve that status during a few key hours. For the rest of the day, it may behave more like a neutral or low-activity station.

No description has been provided for this image

So, I guess that answered my question...¶

This was a fun little investigation. Nothing that can’t be explained with a bit of basic human behavioral logic, but it’s satisfying to see my suspicions confirmed with actual data.

Pro tip: Always make sure you are using the same coordinate system across your geospatial data!!! Would have saved one or two headaches.